#include <ilcplex/cplex.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
#include <mpi.h>
#define MATHLIB_STANDALONE
#include <Rmath.h>

int 
  DZturnoffpreproc(CPXENVptr env),
  DZturnoffcuts   (CPXENVptr env),
  DZsetmipstrategy(CPXENVptr env),
  DZsetmiplimits  (CPXENVptr env),
  DZsetmipoutput  (CPXENVptr env, char* logbuffer),
  DZgetmipprobsize(CPXENVptr env, CPXLPptr lp, 
		   int *nRowsPtr, int *nColsPtr, int *nBinsPtr),
  DZgetbigmindex   (CPXENVptr env, CPXLPptr lp, int ni, int nj, 
		    int **bigmRowIdx, int **bigmColIdx);
static int CPXPUBLIC
   usersetM       (CPXCENVptr env, void *cbdata, int wherefrom,
                   void *cbhandle, int *useraction_p); 

static int CPXPUBLIC
  flagcallback    (CPXCENVptr env, void *cbdata, int wherefrom,
                   void *cbhandle); 
struct Minfo {
  int *flagPtr;
  int ni;  
  int nj;
  double stepsize;
  int **bigmRowIdx;
  int **bigmColIdx;
  double ***bigmValsPtr;
};

double mysecond();

typedef struct Minfo  MINFO, *MINFOptr;

static void
   free_and_null (char **ptr),
   usage         (char *progname);
